﻿@model List<XT.Exam.MODEL.AddTestPaper>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <link href="~/Content/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/style.css" />
    <meta name="viewport" content="width=device-width" />
    <style>
        #reault {
            cursor: not-allowed;
        }
    </style>
    <title>发布试卷</title>
</head>
<body>
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 用户管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="pd-20">
        <div class="text-c">

            <input type="text" class="input-text" style="width:250px" placeholder="输入试卷名称" id="" name="">
            <button type="submit" class="btn btn-success" id="" name=""><i class="icon-search"></i> 搜试卷</button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a>
                <a href="javascript:;" onclick="user_add('添加试卷', '/SysuserInfo/AddTestPaper')" class="btn btn-primary radius"><i class="icon-plus"></i> 添加试卷</a>
            </span>
            <span class="r">共有数据：<strong>@Model.Count</strong>条</span>
        </div>
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
                <tr class="text-c">
                    <th>试卷名称</th>
                    <th>学院名称</th>
                    <th>系</th>
                    <th>阶段</th>
                    <th>单元</th>
                    <th>开始时间</th>
                    <th>考试时间</th>
                    <th>考试班级</th>
                    <th>策略名称</th>
                    <th>是否开放</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @{
                    foreach (var item in Model)
                    {
                        <tr class="text-c">
                            <td><input value="@item.ID" id="Id" type="hidden" />  @item.TestPaper_Name</td>
                            <td>@item.College_Name</td>
                            <td>@item.Tie_Name</td>
                            <td>@item.Phase_Name</td>
                            <td>@item.Unit_Name</td>
                            <td>@item.BeginExam</td>
                            <td>@item.EndTime</td>
                            <td>@item.Class_Name</td>
                            <td>@item.TPStrategy_Name</td>
                            <td>@item.TestPaper_State</td>
                            <td>
                                <a title="删除" href="#" class="ml-5" style="text-decoration: none" onclick="del()"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                <a title="编辑" href = "/SysUserInfo/UpdateTestPaPer/ID=@item.ID" class="ml-5" style="text-decoration:none">
                                    <i class="Hui-iconfont">&#xe6df;</i>
                                </a> 
                            </td>
                        </tr>
                    }
                }
            </tbody>
        </table>
        <div id="pageNav" class="pageNav"></div>
    </div>
    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="~/Content/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/lib/layer/2.4/layer.js"></script>

    <script type="text/javascript" src="~/Content/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/Content/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->

    <script src="~/JS/TestPaperJS.js"></script>

    <script>
        /*资讯-添加*/
        function user_add(title, url) {
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }

        function del() {
            var ID = $("#Id").val();
            alert(ID);
            $.ajax({
                type: "post",
                url: "/SysUserInfo/DeleteAddTestPaPer",
                data: {ID:ID},
                success: function (result) {
                    if (result > 0) {
                        alert("删除成功");
                    }
                    else {
                        alert("删除失败")
                    }
                    location.href = "/SysUserInfo/GetPaPerList";
                }
            })
        }
    </script>
</body>

</html>
